package com.donger.common.sso.feign;

import com.donger.common.core.utils.Result;
import com.donger.common.sso.constant.SsoConstants;
import com.donger.common.sso.entity.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author pmc
 * 用户远程调用接口
 */
@FeignClient(name = SsoConstants.APPLICATION_NAME, contextId = "SsoUserFeign", path = "/user", url = "sso.gateway.k.bpm.plus:30438")
public interface SsoUserFeign {


    /**
     * @param userId 用户id
     * @return 用户信息
     * 根据用户的id在用户中心获取对应的用户信息
     */
    @GetMapping("/userinfo")
    Result<UserInfo> getUserInfo(@RequestParam("userId") Long userId);


}
